import { defineStore } from 'pinia'
import { gethuResourList } from '@/api/analyseProject/taskAnalyse'
export const analyseSourceStore = defineStore('analyseSourceStore', {
    state: () => {
        return {
           dataSource:{
            search:{
              page:1,
              size:10,
              total:0,
              name:'',
              type:"timeAndPeople"
            },
            list:{},
            chartStatistics:{},
            chartCountdown:{}
           }
        }
    },
    actions: {
        clickCheckbox(select){
            // 重新更新数据
        },
        async gethuResourList(){
            const res = await gethuResourList()
            if(res.code === 200){
               this.dataSource.list=res.data
               this.dataSource.chartCountdown=res.data
               this.dataSource.chartStatistics=res.data
            }
        }

    },
    getters: {},
    persist: {
        storage: sessionStorage,
        paths: ['list'],
    }
})